package com.aatattoo.light_food_service.service;

import com.aatattoo.light_food_service.entity.Remind;
import com.aatattoo.light_food_service.mapper.RemindMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author aatattoo
 * @Date 2021/12/9 10:03 下午
 * @msg:
 */
@Service
@Component
public class RemindService {
    @Autowired
    private RemindMapper remindMapper;

    public int addRemind(Remind remind){
        return remindMapper.addRemind(remind);
    }

    public List<Remind> getAllByParentId(Remind remind){
        return remindMapper.getAllByParentId(remind);
    }

    public int getId(Remind remind){
        return remindMapper.getId(remind);
    }

    public int deleteById(int id){
        return remindMapper.deleteById(id);
    }

    public int deleteByParentId(Remind remind){
        return remindMapper.deleteByParentId(remind);
    }

    public int updataOrder(Remind remind){
        return remindMapper.updataOrder(remind);
    }

    public int countRemind(int userId){
        return remindMapper.countRemind(userId);
    }

    public List<Remind> findByPassive(int userId){
        return remindMapper.findByPassive(userId);
    }

    public int updataRemind(int userId){
        return remindMapper.updataRemind(userId);
    }


}
